package org.lemon.transport.context.model;

import lombok.Data;
import org.server.transport.gen.SessionProto;

@Data
public class SessionActivityData {

    private volatile SessionProto.SessionInfoProto sessionInfo;
    private volatile long lastActivityTime;
    private volatile long lastReportedActivityTime;

    public SessionActivityData(SessionProto.SessionInfoProto sessionInfo) {
        this.sessionInfo = sessionInfo;
    }

    public void updateLastActivityTime() {
        this.lastActivityTime = System.currentTimeMillis();
    }
}
